package com.glink.manage.dto.person;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 *
 * @Author : qiushaoshan
 * @create 2024/6/18 9:57
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PersonAccountInfoDTO {
    
    @ApiModelProperty(name = "userName", notes = "登录账号", required = true)
    @NotBlank(message = "登录账号不能为空")
    @Size(min = 4, max = 128, message = "登录账号在4~128个字符")
    @Pattern(regexp = "^[_ a-zA-Z0-9]+$", message = "登录账号不可输入中文和特殊字符，请重新输入")
    private String userName;
    
    @ApiModelProperty(name = "fullName", notes = "姓名", required = true)
    @NotBlank(message = "用户姓名不能为空")
    @Size(max = 128, message = "姓名不能超过128个字符")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5_ a-zA-Z0-9]+$", message = "姓名不可输入特殊字符，请重新输入")
    private String fullName;

    @ApiModelProperty(name = "userNumber", notes = "用户编号")
    @Size(max = 32, message = "用户编号不能超过32个字符")
    private String userNumber;
    
    @ApiModelProperty(name = "phone", notes = "手机号")
    @Size(max = 32, message = "手机号不能超过32个字符")
    private String phone;

    @ApiModelProperty(name = "email", notes = "邮箱")
    @Size(max = 32, message = "邮箱不能超过64个字符")
    private String email;
    
    @ApiModelProperty(name = "orgId", notes = "标准组织id")
    private String orgId;
    
    @ApiModelProperty(name = "status", notes = "用户状态(UserType：01：启用、02：禁用、03：锁定)")
    private String status;

    @ApiModelProperty(name = "roleIdList", notes = "角色ID", required = true)
    @NotNull(message = "角色不能为空")
    private List<String> roleIdList;
}